﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BinaryTree
{
    public class VAmountOfNodes:IVisit
    {
        private int r = 0;
        public int Amount { get { return r; } }
        public void Visit( treeNode _root)
        {
            if (_root != null)
            {
                if (_root.left != null || _root.right != null)
                {
                    r++;
                }
            }
        }
    }
}
